package com.vaadin.demo.jpaaddressbook;

import javax.servlet.annotation.WebServlet;

import com.vaadin.annotations.VaadinServletConfiguration;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinServlet;
import com.vaadin.ui.UI;

public class JpaAddressbookUI extends UI {
    @WebServlet(value = { "/jpademo/*", "/VAADIN/*" }, asyncSupported = true)
    @VaadinServletConfiguration(productionMode = false, ui = JpaAddressbookUI.class, widgetset = "com.vaadin.demo.AppWidgetSet")
    public static class Servlets extends VaadinServlet {
    }

    public static final String PERSISTENCE_UNIT = "addressbook";

    static {
        DemoDataGenerator.create();
    }

    @Override
    protected void init(VaadinRequest request) {
        setContent(new AddressBookMainView());
    }
}
